package com.mxf.code.service.impl;

import com.mxf.code.annotation.Lock4j;
import com.mxf.code.service.TestService;
import org.springframework.stereotype.Service;

/**
 * @author mxf
 * @version 1.0
 * @description: TODO
 * @date 2023/5/8
 */
@Service
public class TestServiceImpl implements TestService {

    @Lock4j(keys = {"#id"})
    @Override
    public void doService(Long id) {
        try {
            Thread.sleep(300L);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("当前毫秒数：" + System.currentTimeMillis());
    }
}
